home *** CD-ROM | disk | FTP | other *** search
/ Mastering Web Site Development / Microsoft Mastering Web Site Development (Microsoft) (1997).iso / Media / Ch03 / W03D025.CC2 < prev    next >
Encoding:
Text File  |  1997-04-24  |  2.7 KB  |  51 lines

  1. 0, In this demonstration, you will see how to use the 
  2. 6, Query Designer in Visual InterDev to create and 
  3. 9, run SQL queries. To use the Query Designer, from the 
  4. 14, Data View tab double-click a table to open the 
  5. 18, table. The Query Designer is composed of several 
  6. 22, panes. To display each pane, click the appropriate 
  7. 26, icon on the Query toolbar. I'll display the Diagram 
  8. 30, pane, the Grid pane, the SQL pane, and Results 
  9. 36, pane. You can use these panes to modify your query. 
  10. 41, For example, I can select which column I want to 
  11. 45, include in my query by selecting the column in the 
  12. 49, Diagram pane. When I select a column, the column 
  13. 54, is listed in the Grid pane and the SQL is updated 
  14. 59, in the SQL pane. You can also type directly in the 
  15. 63, SQL pane. For example, I'll add "MajorID" to my 
  16. 70, SQL. When I tab away the other panes are updated. 
  17. 77, You can add criteria to limit the results of a 
  18. 81, query. For example, I'll add the criteria "='MT101'" to 
  19. 94, the Class ID to limit the results to a specific 
  20. 97, class. To run the query, click the Run icon on the 
  21. 103, Query toolbar. The query is executed and the results 
  22. 107, are displayed in the Results pane. To add a table 
  23. 112, to the query, drag the table from the Data View 
  24. 116, tab to the Diagram pane. If the tables are related, 
  25. 124, a join line appears. To modify the properties of 
  26. 128, the join, right-click the join line and click 
  27. 131, Properties. You can create SQL statements that include 
  28. 141, aggregate values, such as count, max, and min. 
  29. 145, For example, I'll create a query that displays the 
  30. 149, number of students in each class. To do that I'll 
  31. 154, select ClassID from the Classes table and StudentID 
  32. 160, from the Enrollment table. To add a "Group By" 
  33. 164, column to the grid, right-click in the Diagram pane 
  34. 169, and select Group By. For StudentID I'll choose the 
  35. 176, function "Count." For ClassID I'll remove the 
  36. 183, criteria to select all classes and run the query. The 
  37. 189, query executes and the results are displayed in 
  38. 192, the Results pane. You can also execute stored 
  39. 199, procedures by entering the SQL statement directly in 
  40. 204, the SQL pane. For example, I'll execute the 
  41. 208, procedure "Get Student GPA" and pass in a student ID.
  42. 221, When I execute the query, I'll see a dialog box that 
  43. 226, indicates that this query cannot be displayed 
  44. 230, visually. If I choose Yes, the Diagram and Grid panes 
  45. 235, are disabled. However, the SQL continues to execute 
  46. 239, and the results are displayed in the Results 
  47. 242, pane. So, in this demonstration you have seen how to 
  48. 248, use the Query Designer in Visual InterDev to create 
  49. 253, and execute SQL queries.
  50. 256, END
  51.